#include <iostream>
#include <string>
#include "DiccTrie.h"

using namespace std;

int main() {

	DiccTrie<int> d1;
	string s1 = "ss";
	string s2 = "gonzalez";
	string s3 = "fabian";
	string s4 = "h";
	string s5 = "holgado";
	ConjString c;	
	cout << c;
	d1.definir(s1, 1);
	d1.definir(s2, 5);
	d1.definir(s3, 4);
	d1.definir(s4, 1);
	d1.definir(s5, 1);
	cout << s1;
	c.agregar(s1);
	cout << c;
	c.agregar(s2);
	c.agregar(s3);
	cout << c;
	c.eliminar(s3);
	cout << c;
	cout << "DICTRIE! ----------------------------- \n \n";
	cout << d1;
	cout << "Es hijo s1:" << d1.esClave(s1) << "\n";
	cout << "Es hijo s1:" << d1.esClave(s4) << "\n";
	cout << "Es hijo s1:" << d1.esClave(s5) << "\n";
	d1.definir("holguin", 3);
	cout << "Es hijo s1:" << d1.esClave("houin") << "\n";
	cout << "Es hijo s1:" << c.pertenece("holguin") << "\n";
	cout << "Es hijo s1:" << c.pertenece("gonzale") << "\n";
	cout << "Obtener gonzalez" << d1.obtener("fabian") << "\n";
	d1.borrar("fabian");
	d1.borrar("holguin");
	cout << "DICTRIE! ----------------------------- \n \n";
	cout << d1;
/*
	c.eliminar(s2);

	c.eliminar(s3);	
	c.eliminar(s4);
	
	cout << "\n" << c << "\n";
	cout << c.dameTamano();
	cout << "\n Es vacio: " << c.vacio() << "\n";
	c.eliminar(s1);
	cout << "\n" << c << "\n";

	cout << c.dameTamano();
	cout << "\n Es vacio: " << c.vacio() << "\n";
	c.agregar(s4);
	c.agregar(s1);
	c.agregar(s2);
	c.agregar(s3);
	cout << "\n" << c << "\n";
	IteradorConjString it(c);
	s1 = it.proximo();
	cout << s1;
	s1 = it.proximo();
	cout << s1;
	cout << "Hay proximo: " << it.tieneProximo() << "\n";
	s1 = it.proximo();
	cout << s1;
	s1 = it.proximo();
	cout << s1;
	cout << "Hay proximo: " << it.tieneProximo() << "\n";*/
}
